/*
 * Scheme.java
 *
 * @author Vladimir Krukov
 */

package chatty.ui.base;

import DrawControls.*;
import DrawControls.icons.ImageList;
import java.io.*;
import java.util.Vector;
import javax.microedition.lcdui.*;
import chatty.*;
import chatty.comm.*;


public class Skin {

    private Skin() {
    }
    
	static private Image currentSkinImage;
	static private String currentSkinName;
    static private String[] skinNames;
	static private String[] skinFiles;
	
    static {
        Config cfg = new Config().load("/skins/skins.txt");
        skinNames = cfg.getKeys();
        skinFiles = cfg.getValues();

	}
	
    public static void load() {
		//currentSkinImage = skinName;
    }
    
    
	
    static public Image getSkin() {
        return currentSkinImage;
    }

    /* Retrieves color value from color scheme */
    public static String[] getSkinNames() {
        return skinNames;
    }
    
	
    public static void setSkin(int skinNum) {
        if (skinNames.length <= skinNum) {
            skinNum = 0;
        }
        Options.setInt(Options.OPTION_SKIN, skinNum);
        //currentSkinImage = ImageList.loadImage("/skins/" + skinFiles[skinNum]);
		
		//System.arraycopy(themeColors[skinNum], 0, currentTheme, 0 , currentTheme.length);
        //fillCursor = (currentTheme[VirtualList.THEME_TEXT] != currentTheme[VirtualList.THEME_SELECTION_BACK]);
    }
}